home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------//
-
- // Synopsis: Pei matrix.
-
- // Syntax: pei ( N , ALPHA )
-
- // Description:
-
- // pei(N, ALPHA), where ALPHA is a scalar, is the symmetric
- // matrix ALPHA*EYE(N) + ONES(N). If ALPHA is omitted then
- // ALPHA = 1 is used.
-
- // The matrix is singular for ALPHA = 0, -N.
-
- // Reference:
- // M.L. Pei, A test matrix for inversion procedures,
- // Comm. ACM, 5 (1962), p. 508.
-
- // This file is a translation of pei.m from version 2.0 of
- // "The Test Matrix Toolbox for Matlab", described in Numerical
- // Analysis Report No. 237, December 1993, by N. J. Higham.
-
- //-------------------------------------------------------------------//
-
- pei = function ( n, alpha )
- {
- if (!exist (alpha)) { alpha = 1; }
- return alpha*eye(n,n) + ones(n,n);
- };
-